﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_InsertResponseContactUs')
BEGIN
	DROP  Procedure  [esf_sso].P_InsertResponseContactUs
END
GO


CREATE Procedure [esf_sso].P_InsertResponseContactUs
	@pID					VARCHAR (36)
	,@pResponse				VARCHAR (3000)
	,@pResponseUserAlias	VARCHAR (20)
	,@pResponseDateTime		DATETIME = NULL
AS

	IF @pResponseDateTime IS NULL
	BEGIN
		SET @pResponseDateTime = GETDATE ()
	END

	UPDATE esf_sso.ContactUs
	SET Response = @pResponse, ResponseUserAlias = @pResponseUserAlias, ResponseDateTime = @pResponseDateTime
	WHERE ID = @pID

GO